Skip to content
This repository was archived by the owner on Sep 6, 2024. It is now read-only.

Conversation

@RISHABHAGRAWALZRA
Copy link
Collaborator

This is the initial commit for the Avail DA layer integration proposal with optimism's optimistic rollup.

@RISHABHAGRAWALZRA RISHABHAGRAWALZRA changed the title Avail:0:Intial commit:Avail DA layer with op-stack Avail:0:1st Merge:Integration of Avail DA layer with op-stack Sep 25, 2023
@RISHABHAGRAWALZRA RISHABHAGRAWALZRA changed the title Avail:0:1st Merge:Integration of Avail DA layer with op-stack Avail:0:1st Proposal:Integration of Avail DA layer with op-stack Sep 25, 2023
@boundless-forest
Copy link

Hi, Any plan to merge this PR, we(The Darwinia team) would like to test the Op Stack + Avail DA layer with the master branch of this repo.

@RISHABHAGRAWALZRA
Copy link
Collaborator Author

Hi, Any plan to merge this PR, we(The Darwinia team) would like to test the Op Stack + Avail DA layer with the master branch of this repo.

Happy New Year!
I am sorry for the late reply; I was on vacation during this holiday season.

You can check the avail-master branch of this repo and https://docs.availproject.org/build/op-stack/ these docs for guide
Thanks

@boundless-forest
Copy link

boundless-forest commented Jan 4, 2024

Following https://docs.availproject.org/build/op-stack/ and I got stuck at Core Contract Deployment after running the command:

forge script scripts/Deploy.s.sol:Deploy --private-key $PRIVATE_KEY --broadcast --rpc-url $ETH_RPC_URL

The error message:

[⠰] Compiling...
[⠃] Compiling 103 files with 0.8.15
[⠘] Solc 0.8.15 finished in 9.50s
Compiler run successful!
Traces:
  [37219016] → new Deploy@0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519
    └─ ← 185372 bytes of code

  [3090927] Deploy::setUp()
    ├─ [0] VM::projectRoot() [staticcall]
    │   └─ ← "/home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock"
    ├─ [0] VM::envOr("DEPLOY_SCRIPT", "Deploy")
    │   └─ ← <env var value>
    ├─ [0] VM::envOr("DEPLOYMENT_CONTEXT", "")
    │   └─ ← <env var value>
    ├─ [0] VM::envOr("DEPLOY_FILE", "run-latest.json")
    │   └─ ← <env var value>
    ├─ [0] VM::toString(5) [staticcall]
    │   └─ ← "5"
    ├─ [0] VM::createDir("/home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock/deployments/goerli", true)
    │   └─  ()
    ├─ [0] VM::readFile("/home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock/deployments/goerli/.chainId") [staticcall]
    │   └─ ← <file>
    ├─ [0] VM::parseUint("5") [staticcall]
    │   └─ ← 5
    ├─ [0] console::log("Connected to network with chainid %s", 5) [staticcall]
    │   └─  ()
    ├─ [0] VM::readFile("/home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock/deployments/goerli/.deploy") [staticcall]
    │   └─ ← <file>
    ├─ [0] console::log("Storing temp deployment data in %s", "/home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock/deployments/goerli/.deploy") [staticcall]
    │   └─  ()
    ├─ [0] VM::projectRoot() [staticcall]
    │   └─ ← "/home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock"
    ├─ [2671418] → new <unknown>@0xC7f2Cf4845C6db0e1a1e91ED41Bcd0FcC1b0E141
    │   ├─ [0] console::log("DeployConfig: reading file %s", "/home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock/deploy-config/goerli.json") [staticcall]
    │   │   └─  ()
    │   ├─ [0] VM::readFile("/home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock/deploy-config/goerli.json") [staticcall]
    │   │   └─ ← <file>
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.finalSystemOwner")
    │   │   └─ ← 0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.controller")
    │   │   └─ ← 0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.portalGuardian")
    │   │   └─ ← 0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.l1ChainID")
    │   │   └─ ← 5
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.l2ChainID")
    │   │   └─ ← 420
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.l2BlockTime")
    │   │   └─ ← 2
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.maxSequencerDrift")
    │   │   └─ ← 600
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.sequencerWindowSize")
    │   │   └─ ← 3600
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.channelTimeout")
    │   │   └─ ← 300
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.p2pSequencerAddress")
    │   │   └─ ← 0x715b7219D986641DF9eFd9C7Ef01218D528e19ec
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.batchInboxAddress")
    │   │   └─ ← 0xff00000000000000000000000000000000000420
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.batchSenderAddress")
    │   │   └─ ← 0x7431310e026B69BFC676C0013E12A1A11411EEc9
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.l2OutputOracleSubmissionInterval")
    │   │   └─ ← 120
    │   ├─ [0] VM::parseJsonInt("<stringified JSON>", "$.l2OutputOracleStartingTimestamp")
    │   │   └─ ← 1673550516 [1.673e9]
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.l2OutputOracleStartingBlockNumber")
    │   │   └─ ← 4061224 [4.061e6]
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.l2OutputOracleProposer")
    │   │   └─ ← 0x02b1786A85Ec3f71fBbBa46507780dB7cF9014f6
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.l2OutputOracleChallenger")
    │   │   └─ ← 0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.finalizationPeriodSeconds")
    │   │   └─ ← 12
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.proxyAdminOwner")
    │   │   └─ ← 0xf80267194936da1E98dB10bcE06F3147D580a62e
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.baseFeeVaultRecipient")
    │   │   └─ ← 0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.l1FeeVaultRecipient")
    │   │   └─ ← 0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.sequencerFeeVaultRecipient")
    │   │   └─ ← 0xBc1233d0C3e6B5d53Ab455cF65A6623F6dCd7e4f
    │   ├─ [0] VM::parseJsonString("<stringified JSON>", "$.governanceTokenName")
    │   │   └─ ← "Optimism"
    │   ├─ [0] VM::parseJsonString("<stringified JSON>", "$.governanceTokenSymbol")
    │   │   └─ ← "OP"
    │   ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.governanceTokenOwner")
    │   │   └─ ← 0x038a8825A3C3B0c08d52Cc76E5E361953Cf6Dc76
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.l2GenesisBlockGasLimit")
    │   │   └─ ← 25000000 [2.5e7]
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.l2GenesisBlockBaseFeePerGas")
    │   │   └─ ← 1000000000 [1e9]
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.gasPriceOracleOverhead")
    │   │   └─ ← 2100
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.gasPriceOracleScalar")
    │   │   └─ ← 1000000 [1e6]
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.eip1559Denominator")
    │   │   └─ ← 50
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.eip1559Elasticity")
    │   │   └─ ← 10
    │   ├─ [0] VM::parseJsonUint("<stringified JSON>", "$.l2GenesisRegolithTimeOffset")
    │   │   └─ ← no matching value found at "$.l2GenesisRegolithTimeOffset"
    │   └─ ← 0 bytes of code
    └─ ← no matching value found at "$.l2GenesisRegolithTimeOffset"



== Logs ==
  Connected to network with chainid 5
  Storing temp deployment data in /home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock/deployments/goerli/.deploy
  DeployConfig: reading file /home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock/deploy-config/goerli.json
Error: 
script failed: <no data>
DeployConfig: reading file /home/bear/coding/go-space/avail-op-stack-adapter/packages/contracts-bedrock/deploy-config/goerli.json
 no matching value found at "$.l2GenesisRegolithTimeOffset"

The script tried to read l2GenesisRegolithTimeOffset from the goerli.json, but failed. It seems that the script doesn't write the correct config json avail-optimism.json that we created before. If in this case, the scripts may need some tweaking.


Update: That's my mistake, please ignore this issue, I copy the env file out to a separate workaround location. The tweak envrc file must under the contracts-bedrock.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants